View Issue Details

IDProjectCategoryView StatusLast Update
0001390K18X001.00 SKB SWANSWpublic2021-11-12 09:50
Reporter(SW) River WongAssigned To(ALTech) Wooshin Kang Due Date
PrioritynormalSeveritys3-moderateReproducibilitysometimes
Status closedResolutionfixed 
Summary0001390: CEC implemented in BTF Display module causes CEC issue in some TVs
DescriptionHi Wooshin,

We recently found an issue that SWAN will infinitely send CEC invalid data (0x40) to TV after we repeatedly do standby/wakeup by RCU.
It will cause the CEC not working any more after this issue happens.
It can be easily to reproduce on some TVs and some TVs has no such problem.
We raised a synaptics jira 174: https://synaextjira.atlassian.net/jira/software/c/projects/SKBSBALT/issues/SKBSBALT-174.
And Synpatics R&D said there is a race condition. CECSVS should not be used at the same time with Android CEC HAL.
After checking the code, I found that Sptek add CECSVS APIs in Display module of BTF HAL.
I try to remove all CEC related code in Display module and the issue is gone. And I found the CEC function still works after I remove CEC related code in Display module. So, I think Sptek should had already done some controls to Android CEC HAL to make CEC work.

So, I need your help to check with Sptek about my modification in attached patch "remove_cec_from_BTF_Display.patch" (vendor/synaptics/btv-hal-impl/bfx-ua300/). Please let Sptek review it to see if they have any concern on it.

PS: I also discussed with Kerwin, Smart3 also remove almost CEC related code in Display module.
Steps To Reproduce1.Connect to Sharp LC-40V7 TV
2.Enable CEC on SWAN.
3.Use RCU to do stadnby and wakeup repeatedly.
4.After wake up, use analyzer to check the CEC signal to see if it continuously send 0x40.
   You can refer to attached picture sharp_repeat_send_0x40_opcode_0x40.jpg about the CEC signal.

Aftere step4, CEC function is no working any more.
Additional InformationSo far, we tested on 4 TVs and found 2 of them can reproduce this issue.
TVs that has this problem:
Sharp LC-40V7
Infocus XT-40SN811

Tv that does have this problem:
Sony KD-55X9000E
LG OLED55B7T-D
TagsNo tags attached.
Attach Tags

Users monitoring this issue

User List (SW) Brent Choi

Activities

(SW) River Wong

2021-11-11 15:31

developer  

remove_cec_from_BTF_Display.patch (1,805 bytes)   
diff --git a/hal_v_disp.c b/hal_v_disp.c
index 0bbf370..ee4b5ed 100644
--- a/hal_v_disp.c
+++ b/hal_v_disp.c
@@ -820,6 +820,7 @@ void update_supported_resolutions(DISPLAY_HANDLE display)
 	}
 }
 
+/* Vas removed to avoid race condition with Audio CEC HAL; River 2021/11/11
 HRESULT standby(void *contextparam)
 {
 	DISPLAY_HANDLE display = (DISPLAY_HANDLE)contextparam;
@@ -968,6 +969,7 @@ HRESULT getosdstr(void *Contextparam, char *str)
 
     return 0;
 }
+*/
 
 int isHexChar(const char c) {
     return ('0' <= c && c <= '9') || ('a' <= c && c <= 'f') || ('A' <= c && c <= 'F');
@@ -1010,7 +1012,7 @@ HRESULT getvendorID(void *Contextparam, int *vendorid)
 }
 // add echwang : 2020.04.03 - E
 
-
+/* Vas removed to avoid race condition with Audio CEC HAL; River 2021/11/11
 HRESULT box_cecsvs_init(DISPLAY_HANDLE display)
 {
 	HRESULT r = SUCCESS;
@@ -1059,6 +1061,7 @@ HRESULT box_cecsvs_init(DISPLAY_HANDLE display)
 	return r;
 
 }
+*/
 
 void register_event_handler(DISPLAY_HANDLE display) {
 	synaptics_display *syna_display = (synaptics_display *)display;
@@ -1271,7 +1274,7 @@ int  DISPLAY_Create(DISPLAY_HANDLE *display) {
 	// add echwang : 2020.04.06 + S
 	
 	register_event_handler(*display);
-	box_cecsvs_init(*display);
+	//box_cecsvs_init(*display); //Vas removed to avoid race condition with Audio CEC HAL; River 2021/11/11
 	update_sink_caps(*display);
 	update_supported_resolutions(*display);
 
@@ -1297,7 +1300,7 @@ int  DISPLAY_Destroy(DISPLAY_HANDLE display) {
 
 	unregister_event_handler(display);
 
-	BOX_CEC_SVS_Term();
+	//BOX_CEC_SVS_Term(); //Vas removed to avoid race condition with Audio CEC HAL; River 2021/11/11
 
 	if( syna_display->ampFactory != NULL ) {
 //        AMP_RPC(ret, AMP_FACTORY_DestroyDisplayService, syna_display->ampFactory, &syna_display->amp_disp);

(ALTech) Wooshin Kang

2021-11-11 16:18

developer   ~0008712

Last edited: 2021-11-11 16:30

Hi River,

I have discussed it with SPTEK.
They told me, "hal_v_disp.c" is not controlled by sptek and you can change code of this file.
So, you can apply your patch.

For information, this file is copied from AI2 project, so you to change it to fit our product.

Thanks.

(SW) River Wong

2021-11-12 09:50

developer   ~0008718

Hi Wooshin,

I committed the code to fix this issue.

commit dc20ca32b4b797e1f11993401766e78af0c2f5b7
Author: river wong <river.wong@fii-foxconn.com>
Date: Fri Nov 12 09:48:06 2021 +0800

    To fix CEC will not work after sometimes wakeup from standby for some TVs.
    Fix by avoiding race condition with Android CEC HAL.

(SW) River Wong

2021-11-12 09:50

developer   ~0008719

Fix is committed.
If any problem found, then we can reopen it.

Issue History

Date Modified Username Field Change
2021-11-11 15:31 (SW) River Wong New Issue
2021-11-11 15:31 (SW) River Wong Status new => assigned
2021-11-11 15:31 (SW) River Wong Assigned To => (ALTech) Wooshin Kang
2021-11-11 15:31 (SW) River Wong File Added: remove_cec_from_BTF_Display.patch
2021-11-11 15:31 (SW) River Wong File Added: sharp_repeat_send_0x40_opcode_0x40.jpg
2021-11-11 15:39 (SW) River Wong Issue Monitored: (SW) Brent Choi
2021-11-11 16:18 (ALTech) Wooshin Kang Note Added: 0008712
2021-11-11 16:30 (ALTech) Wooshin Kang Note Edited: 0008712
2021-11-12 09:50 (SW) River Wong Note Added: 0008718
2021-11-12 09:50 (SW) River Wong Status assigned => closed
2021-11-12 09:50 (SW) River Wong Resolution open => fixed
2021-11-12 09:50 (SW) River Wong Note Added: 0008719